<?php

namespace CNAM\ActimanBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * acProcedure
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="CNAM\ActimanBundle\Repository\acProcedureRepository")
 */
class acProcedure
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="nomProcedure", type="string", length=255)
     */
    private $nomProcedure;

    /**
     * @var string
     * 
     * @ORM\Column(name="description", type="text", nullable=true)
     */
    private $description;
    
    /**
     * @var \DateTime
     *
     * @ORM\Column(name="dateCreation", type="date")
     */
    private $dateCreation;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="dateModification", type="date")
     */
    private $dateModification;
    
    /**
     * @var \boolean
     *
     * @ORM\Column(name="status", type="boolean")
     */
    private $status;
    
    /**
     *
     * @ORM\OneToMany(targetEntity="Phase",mappedBy="acProcedure",cascade={"remove"})
     * @ORM\JoinColumn(nullable=false)
     */
    protected $Phases;
    
    
    /**
     *
     * @ORM\ManyToOne(targetEntity="Service")

     */
    protected $service;
    
    /**
     *
     * @ORM\ManyToOne(targetEntity="User")
     */
    protected $user;

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set nomProcedure
     *
     * @param string $nomProcedure
     * @return acProcedure
     */
    public function setNomProcedure($nomProcedure)
    {
        $this->nomProcedure = $nomProcedure;

        return $this;
    }

    /**
     * Get nomProcedure
     *
     * @return string 
     */
    public function getNomProcedure()
    {
        return $this->nomProcedure;
    }

    /**
     * Get description
     *
     * @return string 
     */
    public function getDescription() {
        return $this->description;
    }
    
    /**
     * Set description
     *
     * @param string $description
     */
    public function setDescription($description) {
        $this->description = $description;
    }
    
    /**
     * Set dateCreation
     *
     * @param \DateTime $dateCreation
     * @return acProcedure
     */
    public function setDateCreation($dateCreation)
    {
        $this->dateCreation = $dateCreation;

        return $this;
    }

    /**
     * Get dateCreation
     *
     * @return \DateTime 
     */
    public function getDateCreation()
    {
        return $this->dateCreation;
    }

    /**
     * Set dateModification
     *
     * @param \DateTime $dateModification
     * @return acProcedure
     */
    public function setDateModification($dateModification)
    {
        $this->dateModification = $dateModification;

        return $this;
    }

    /**
     * Get dateModification
     *
     * @return \DateTime 
     */
    public function getDateModification()
    {
        return $this->dateModification;
    }

    /**
     * Set status
     *
     * @param boolean $status
     * @return acProcedure
     */
    public function setStatus($status)
    {
        $this->status = $status;

        return $this;
    }

    /**
     * Get status
     *
     * @return boolean 
     */
    public function getStatus()
    {
        return $this->status;
    }
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->Phases = new \Doctrine\Common\Collections\ArrayCollection();
    }

    /**
     * Add Phases
     *
     * @param \CNAM\ActimanBundle\Entity\Phase $phases
     * @return acProcedure
     */
    public function addPhase(\CNAM\ActimanBundle\Entity\Phase $phases)
    {
        $this->Phases[] = $phases;

        return $this;
    }

    /**
     * Remove Phases
     *
     * @param \CNAM\ActimanBundle\Entity\Phase $phases
     */
    public function removePhase(\CNAM\ActimanBundle\Entity\Phase $phases)
    {
        $this->Phases->removeElement($phases);
    }

    /**
     * Get Phases
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getPhases()
    {
        return $this->Phases;
    }

    /**
     * Set service
     *
     * @param \CNAM\ActimanBundle\Entity\Service $service
     * @return acProcedure
     */
    public function setService(\CNAM\ActimanBundle\Entity\Service $service = null)
    {
        $this->service = $service;

        return $this;
    }

    /**
     * Get service
     *
     * @return \CNAM\ActimanBundle\Entity\Service 
     */
    public function getService()
    {
        return $this->service;
    }

    /**
     * Set user
     *
     * @param \CNAM\ActimanBundle\Entity\User $user
     * @return acProcedure
     */
    public function setUser(\CNAM\ActimanBundle\Entity\User $user = null)
    {
        $this->user = $user;

        return $this;
    }

    /**
     * Get user
     *
     * @return \CNAM\ActimanBundle\Entity\User 
     */
    public function getUser()
    {
        return $this->user;
    }
}
